package es.decloud.service;

import java.util.List;

import javax.jws.WebService;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;

import es.decloud.model.Aula;

/**
 * Business Service Interface to handle communication between web and
 * persistence layer.
 * 
 * @author <a href="mailto:dtercero@gmail.com">David Tercero </a>
 */
@WebService
@Path("/aulas")
public interface AulaService {

	/**
	 * 
	 * {@inheritDoc}
	 */
	@GET
	List<Aula> getAulas(String idCentro);

	/**
	 * {@inheritDoc}
	 */
	Aula getAulaByNombre(@PathParam("idcentro") Long idCentro, @PathParam("nombre") String nombre);

	/**
	 * Retrieves a aula by aulaId. An exception is thrown if aula not found
	 * 
	 * @param aulaId
	 *            the identifier for the aula
	 * @return Aula
	 */
	@GET
	@Path("{id}")
	Aula getAula(@PathParam("id") String id);

	/**
	 * {@inheritDoc}
	 */
	@POST
	Aula saveAula(Aula aula);

	/**
	 * {@inheritDoc}
	 */
	@DELETE
	void removeAula(Long idAula);
}
